package model

// User 用户表
type Courses struct {
	Id      int    `json:"id" form:"id"`
	Cno     int    `json:"cno" form:"cco"`
	Cname   string `json:"cname" form:"cname"`
	Teacher string `json:"teacher" form:"teacher"`
	Cid     int    `json:"cid" form:"cid"`
}

func CoursesAll(cid string) ([]Courses, error) {
	mods := make([]Courses, 0, 4)
	err := DB.Select(&mods, "select * from course where cid=?", cid)
	return mods, err
}
